package com.boomsecret.utils;

import android.app.Activity;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/7/17.
 */
public class AppManager {
    public static String Tag = AppManager.class.getSimpleName();

    private static List<Activity> list = new ArrayList<Activity>();

    public static void add(Activity activity) {
        list.add(activity);
    }

    public static void remove(Activity activity) {
        list.remove(activity);
    }

    public static void exit() {
        for (Activity item: list) {
            item.finish();
        }
        list.clear();
        list = null;
    }
}
